<!doctype html>
<html>
{include file="head.html"}

<body>
<div class="header" >
  
  <div class="title">打款管理</div>
  <a class="right-btn" target="_blank" href="/index.php?m=cron&a=Ymdian_dakuan">生成打款</a>
</div>
<form method="get" action="{$appadmin}" class="pd-5" >
<input type="hidden" name="m" value="ymdian_dakuan" />
<input type="hidden" name="a" value="default" />
	<div class="row">
    	<span>
        {get data=sites model=sites fun=select(array("where"=>"1"))}
学校：<select name="siteid" class="w100">
<option value="0">请选择</option>
{foreach item=c   from=$sites} 
<option value="{$c.siteid}" {if get('siteid') eq $c.siteid} selected="selected"{/if}>{$c.sitename}</option>
{/foreach}
</select>
        
        </span>
        <span>
        {get data=shops model=ymdian fun=select(array("where"=>"1"))}
        店铺：
        <select name="shopid" class="w100">
        	<option value="0">请选择</option>
            {foreach item=s from=$shops}
            <option value="{$s.id}" {if $s.id eq get('shopid')} selected{/if}>{$s.title}</option>
            {/foreach}
        </select>
        </span>
        <span>
        打款状态：
        <select name="status" class="w100">
        	<option value="0">请选择</option>
            <option value="1" {if get('status') eq 1} selected{/if}>未确认</option>
            <option value="2" {if get('status') eq 2} selected{/if}>已完成</option>
            <option value="4" {if get('status') eq 4} selected{/if}>已取消</option>
        </select>
        </span>
        </div>
        <div class="row">
        开始时间：<input type="text" name="start_time" value="{$smarty.get.start_time}"  onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
结束时间：<input type="text" name="end_time" value="{$smarty.get.end_time}"   onClick="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})" />
<input type="submit" value="搜索" class="btn btn-warning" />
    </div>
</div>
</form>
<div class="skyline"></div>
<div class="uclist">
	{foreach item=c from=$data}
		<div class="item">
        	<div class="hd">{if $c.status eq 4}已取消{elseif $c.status eq 2}已完成{else}待完成{/if} &nbsp;{if $c.ispay eq 1}未支付 {if time()>$c.endtime}<span style="color:red">打款超时</span>{/if} {else}已支付{/if}  <span class="right">￥{$c.money}</span> </div>
            
            <div class="row h30">到期时间：{$c.endtime|date:Y-m-d} <span class="right">生成时间：{$c.dateline|date:Y-m-d}</span></div>
            <div class="row h30">学校：{$c.site_name} <span class="right">店铺：{$c.shop_name}</span></div>
            <div class="info">{$c.content}</div>
            {if $c.payinfo}
            <div class="info">{$c.payinfo}</div>
            {/if}
            
            <div class="tools">
            	<a href="{$appadmin}?m=ymdian_dakuan&a=add&id={$c.id}">查看付款</a>
            </div>
        </div>
    {/foreach}
</div>
{$pagelist}
<script language="javascript" src="/plugin/My97DatePicker/WdatePicker.js"></script>
</body>
</html>
